package com.avantis.common.entity;

import com.avantis.common.entity.base.BaseEntity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


import javax.persistence.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * @ClassName Customer
 * @Description 客户信息表
 * @Author kirago
 * @Date 2018/12/17 10:53
 * @Version 1.0
 **/
@Entity
@Table(name = "k_customer")
@Data
public class Customer extends BaseEntity implements Serializable {

	@ApiModelProperty("客户编码")
	@Column
	private String customerCode;

	@ApiModelProperty("客户名称")
    @NotNull(message = "客户名称是必填项!")
    @NotEmpty(message = "客户名称是必填项!")
	@Column
	private String customerName;

	/**
	 * 客户性别， 0：男性；1：女性
	 */
	@ApiModelProperty("客户性别")
	@Column
	private Integer customerSex=0;

	@ApiModelProperty("联系人姓名")
    @NotNull(message = "联系人姓名必填项!")
    @NotEmpty(message = "联系人姓名必填项!")
	@Column
	private String contentName;

    @ApiModelProperty("联系人手机号码")
    @NotNull(message = "联系人手机号码必填项!")
    @NotEmpty(message = "联系人手机号码必填项!")
	@Column
	private String contentPhone;

    @ApiModelProperty("客户微信号")
	@Column
	private String customerWechat;

    @ApiModelProperty("客户QQ号")
	@Column
	private String customerQq;

    @ApiModelProperty("客户邮箱")
	@Column
	private String customerEmail;

	/**
	 * 邮编
	 */
	@ApiModelProperty("邮编信息")
	@Column
	private String customerPostCode;

	/**
	 * 期初欠款
	 */
	@ApiModelProperty("期初欠款")
	@Column
	private double customerDebt;

	/**
	 * 客户等级，普通：0，一级：1；二级：2；三级：3
	 * 默认为普通等级
	 */
	@ApiModelProperty("客户等级")
    @NotNull(message = "客户等级必填项!")
	@Column
	private Integer customerLevel = 0;

	/**
	 * 关联业务员
	 */
	@ApiModelProperty("业务员信息/客户来源")
	@Column
	private String relatedSalesman;

	/**
	 * 设置为默认客户
	 * 1：是；0：不是
	 * 默认为普通客户
	 */
	@ApiModelProperty("是否为默认客户？")
	@Column(nullable = false)
	private Integer isDefault = 0;

	/**
	 * 客户类型
	 * 1：个体户 2：单位（单位时，录入单位信息，此类型可自定义，树形展示）
	 * 默认为个体户
	 */
	@ApiModelProperty("客户类型")
	@Column(nullable = false)
	private Integer customerType = 0;

	/**
	 * 联系地址
	 */
	@ApiModelProperty("客户地址")
	@Column(nullable = false)
	private String customerAddress;

	/**
	 * 传真
	 */
	@ApiModelProperty("客户传真")
	@Column
	private String customerFax;

	/**
	 * 单位电话
	 */
	@ApiModelProperty("单位电话")
	@Column(nullable = false)
	private String customerUnitPhone;

	@ApiModelProperty("单位")
	@Column(nullable = false)
	private String customerUnit;

	/**
	 * 客户状态
	 * 1：启用；0：停用
	 * 默认为启用
	 */
	@ApiModelProperty("客户状态 1：启用；0：停用")
	@Column(nullable = false)
	private Integer customerStatus = 1;

	@ApiModelProperty("所属分类")
	@Column
	private String customerBelong;

	/**
	 * 备注
	 */
	@ApiModelProperty("备注信息")
	@Column
	private String remark;

}
